package com.itheima.day06;

import java.util.*;

public class Practice11 {
    public static void main(String[] args) {
        //迭代器
        List<Integer> list = new ArrayList<>();
        Collections.addAll(list,46,4,54,32,56,6,334,6);
        System.out.println(list);

        //迭代器遍历
        Iterator<Integer> iterator = list.iterator();
        while (iterator.hasNext()) {
            Integer next = iterator.next();
            System.out.println(next);
        }
    }
}
